package com.ev;

import com.ev.framework.aspect.WebLogAspect;
import com.ev.framework.socket.Server;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.annotation.Resource;

@EnableConfigurationProperties
@EnableTransactionManagement
@ServletComponentScan
@MapperScan({"com.ev.*.dao","com.ev.*.mapper"})
@SpringBootApplication
@EnableCaching
@EnableScheduling
//public class EvApplication implements CommandLineRunner {
public class EvApplication  {
//    @Resource
//    private Server socketServer;
//
//    @Value("${socketPort}")
//    private String socketPort;

    private static final Logger logger = LoggerFactory.getLogger(WebLogAspect.class);

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(EvApplication.class, args);
        System.out.println("---------启动成功！--------");
    }

//    @Override
//    public void run(String... strings) throws Exception {
//        socketServer.run(Integer.parseInt(socketPort));
//    }


}
